# AI Chorus -API Access
An algorithm that turns a single voice into a chorus.
# Task Creation
Create an algorithm task based on the input parameters and return the task id
# Request Address
/v3/pic/acs/batch
# Request Parameter
Method
post
Header
Field | Required | Type | Value | Description |
---|---|---|---|---|
Content-Type | YES | string | application/json | |
Authorization | YES | string | Basic xxxxxxxxx | Basic base64 (appkey:appsecret) created by users combining appkey and secret |
Body
Field | Son Field | Required | Type | Value | Description |
---|---|---|---|---|---|
file_link | - | YES | string | Cloud storage address of audio file | |
voice_num | - | YES | number | Number of people in chorus, greater than or equal to 0, with default of 3 | |
file_info | - | YES | object | Audio file information | |
- | file_size | YES | number | File size, with unit of byte | |
- | file_md5 | YES | string | MD5 value of audio file | |
- | file_time | YES | number | Integer (int) audio duration, with unit of seconds (s) | |
- | file_ext | YES | string | Audio file format, wav | |
file_ext | - | YES | string | Output audio format | |
priority | - | YES | integer | Priority, range [0,9] |
Sample Code
{
"file_link": "Downloadable audio file link",
"voice_num": 3,
"file_ext": "wav",
"file_info": {
"file_size": 10778976,
"file_md5": "1bf1f1e6f112b2fb5836c1c3abcb5411",
"file_time": 168,
"file_ext": "wav"
},
"priority": 1
}
# Input File Restriction
Audio Format | Audio Size | Audio Length |
---|---|---|
MP3 WAV | No more than 50 MB |
# Return Data
Body
Field | Son Field | Required | Type | Value | Description |
---|---|---|---|---|---|
code | - | YES | number | Status Code | |
msg | - | YES | string | Request Information | |
data | - | YES | object | Response Data | |
- | task_id | YES | string | Task id |
Sample Code
{
"code": 0,
"msg": "",
"data": {
"task_id": "6a4eab77-be30-430a-bf0e-3048042a34ef"
}
}
# Result Acquisition
Request task processing result based on task id
# Request Address
/v3/pic/acs/result/{stask_id}
# Request Parameter
Method
get
Header
Field | Required | Type | Value | Description |
---|---|---|---|---|
Content-Type | YES | string | application/json | |
Authorization | YES | string | Basic xxxxxxxxx | Basic base64 (appkey:appsecret) created by users combining appkey and secret |
Path Parameter
Field | Son Field | Required | Type | Value | Description |
---|---|---|---|---|---|
task_id | - | YES | string | Task id |
# Return Data
Body
Field | Son Field | Required | Type | Value | Description |
---|---|---|---|---|---|
code | - | YES | number | Status Code | |
msg | - | YES | string | Request Information | |
data | - | YES | object | Response Data | |
- | status | YES | string | Task Status: 1- Waiting; 2 - In progress; 3 - Task complete; 4 - Task failure; 5 - Task closed; 6 - Task timed out | |
- | wait_time | YES | string | The waiting time before the next request, with unit of s | |
- | voice_result | YES | string | Audio download link after processing | |
- | reason | YES | string | Cause of failure |